<include file="header"/>
<body class="bg-grey">
<div class="wraper margin-b">
    <div class="head clearfix">
        <a href="javascript:window.history.back(-1);" class="iconfont icon-zuojiantou pull-left"></a>
        <span class="head-name pull-left">信息认证</span>
    </div>
    <div class="lists block-top">
        <p class="status_ {BEESCRM:$getTextColor[$orderData['status']]}">{BEESCRM:$getOrderStatus[$orderData['status']]}</p>
        <p>预约人：{BEESCRM:$orderData.real_name}</p>
        <p>联系电话：{BEESCRM:$orderData.tel}</p>
        <p>预约时段：{BEESCRM:$orderData.start_time|date="Y-m-d",###}至{BEESCRM:$orderData.end_time|date="Y-m-d",###}</p>
        <p>病情描述：{BEESCRM:$orderData.summary}</p>
        <if condition="$orderData.status eq 3">
            <p>病人评价：{BEESCRM:$content}</p>
        </if>
       <!-- <p>评价类型：好评</p>
        <p>评语：阿姨很有耐心，点赞！</p>-->
    </div>
    <if condition="$orderData.status eq 0"><a href="#" class="normal-btn">确认接单</a>
    </if>

</div>
<div class="pop-box" id="getEndEscort">
    <div class="main">
        <p class="iconfont icon-shenheshibai"></p>
        <div class="main-text">
            <p class="stress text-center">您确定要接单吗？</p>
            <div class="btn-box clearfix">
                <a href="#" class="text-btn" id="isCancel">取消</a>
                <a href="#" class="text-btn" id="isConfirm">确定</a>
            </div>
        </div>
    </div>
</div>
<div class="pop-box" id="pop-box">
    <div class="main">
        <p class="iconfont icon-shenheshibai"></p>
        <div class="main-text">
            <p class="text-center">请耐心等待审核</p>
        </div>
    </div>
</div>
<input type="hidden" value="{BEESCRM:$orderData.id}" id="isId">
<script src="/assets/park/huser/js/jquery-2.1.0.min.js"></script>
<script src="/assets/park/huser/js/date.js"></script>
<script src="/assets/park/huser/js/iscroll.js"></script>
<script>
    $('#beginTime').date();
    $('#endTime').date();

    $(".normal-btn").on('click',function(){
        $("#getEndEscort").show();
    });

    $("#isCancel").on('click',function(){
        $("#getEndEscort").hide();
    });

    $("#isConfirm").on('click',function(){
        var id = $("#isId").val();
        $.ajax({
            url:'/Park/hkeeper/orderTakers/conf_id/1',
            type:'POST',
            dataType:'json',
            data:{id:id,token:1},
            success:function(data){
                if(data.err_code == 200){
                    $('#getEndEscort').hide();
                    $("#pop-box").show();
                    $("#pop-box").find('.text-center').text('亲，确认成功');
                    setTimeout('setHide()',2000);
                }else{
                    $("#pop-box").find('.text-center').text(data.message);
                    $("#pop-box").show();
                    setTimeout('setHide()',2000);
                }
            }
        });
    });
    function setHide()
    {
        $('#getEndEscort').hide();
        $("#pop-box").hide();
        reload();
    }

    //页面刷新
    function reload(){
        setTimeout('location.reload()',10);
    }
</script>
</body>
</html>
